package com.decent.ejfadmin.user.bean;


import com.decent.ejfadmin.common.exception.OperateFailException;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

/**
 * 银行编码映射
 *
 * @author weicx
 * @date 2018/09/11
 */
@Data
public class BankCodeMap {
    /**
     * 自增id
     */
    private Integer id;
    /**
     * 银行名称
     */
    private String bankName;
    /**
     * 银行账号类型
     */
    private String bankAccountType;
    /**
     * 银行编码
     */
    private String bankCode;
    /**
     * 打款银行
     */
    private String payBank;

    /**
     * 参数检测
     */
    public void checkParam() {
        if (StringUtils.isBlank(bankName) || StringUtils.isBlank(bankAccountType)
                || StringUtils.isBlank(bankCode) || StringUtils.isBlank(payBank)) {
            throw new OperateFailException("参数错误");
        }
        bankName = StringUtils.trim(bankName);
        bankCode = StringUtils.trim(bankCode);
        payBank = StringUtils.trim(payBank);
    }


}
